refactor(web): simple reuse of search modules 🚂#14921
Merged
jahorton merged 1 commit intoepic/autocorrectfrom Jan 21, 2026
Merged
refactor(web): simple reuse of search modules 🚂#14921jahorton merged 1 commit intoepic/autocorrectfrom
jahorton merged 1 commit intoepic/autocorrectfrom
Conversation
User Test ResultsTest specification and instructions User tests are not required |
db32a59 to
be473a1
Compare
1eaf922 to
ddf9a58
Compare
This changes SearchQuotientSpur to construct new instances whenever the path is extended, treating SearchQuotientSpur as an immutable portion of the search graph that may be extended by new input, creating new instances of SearchQuotientSpur. This, in turn, removes the need to clone SearchQuotientSpur instances when new input is received for an incoming token; the original instance's represention will remain unchanged and may also be reused by a new instance extending the graph for the newly-received input. Relates-to: #14445 Build-bot: skip build:web Test-bot: skip
6ecc09a to
4b20187
Compare
Base automatically changed from
refactor/web/relocate-search-space
to
epic/autocorrect
January 21, 2026 21:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes SearchQuotientSpur, our predecessor to module-based search-graph management, to construct new instances whenever the path is extended, treating SearchQuotientSpur as an immutable portion of the search graph that may be referenced by path extensions - new instances of SearchQuotientSpur. No inputs may be added into pre-existing instances (the previous pattern) - instead, adding an input creates a new instance that references and utilizes the old one without editing what it represents.
This, in turn, removes the need to clone SearchQuotientSpur instances when new input is received for an incoming token.
Relates-to: #14445
Note that the class itself is transition in this PR. This PR is focused entirely on facilitating the transition to search-space immutability. Further work (starting in #14979 and #14987) will increase the abstraction and further alter the design into a new design pattern that will facilitate correction across word-boundary shifts, such as when fat-fingering a whitespace key.
Build-bot: skip build:web
Test-bot: skip